function GenerateWikiText(variableName,seqIndex)

load(variableName);

fileID = fopen('wikioutput.txt','w');

numTargets = sum(best_fullSeq(:,1)==-1);

fprintf(fileID, '<code - %dtargets_detailed', numTargets);

% Print Detection Power
fprintf(fileID, 'DetectionPower = %f', best_detectPower(1,seqIndex));
fprintf (fileID,'\n\n');

% Print baseSeq
fprintf(fileID, 'baseSeq = [');
fprintf(fileID,'%d ',best_baseSeq(:,seqIndex));
fprintf (fileID,']\n\n');

% Print baseSeq
fprintf(fileID, 'probability_repetition = [');
fprintf(fileID,'%f ',best_probability_repetition(:,seqIndex));
fprintf (fileID,']\n\n');

% Print base_transition_sequence
fprintf(fileID, 'base_transition_sequence = [');
fprintf(fileID,'%d ',best_transition_sequence(:,seqIndex));
fprintf (fileID,']\n\n');

% Print full_transition_sequence
fprintf(fileID, 'full_transition_sequence = [');
fprintf(fileID,'%d ',best_transSeq(:,seqIndex));
fprintf (fileID,']\n\n');

% Print strSeq
reshaped_str = reshape(best_strSeq(:,seqIndex),15,15);
fprintf(fileID, 'strSeq = \n');
for i=1:15
    for j=1:15
        fprintf(fileID, reshaped_str(i,j));
    end
    fprintf(fileID, '\n');
end
fprintf (fileID,'\n');

% Print fullSeq
fprintf(fileID, 'fullSeq = [');
fprintf(fileID,'%d ',best_fullSeq(:,seqIndex));
fprintf (fileID,']\n\n');

fprintf(fileID, '</code>');



fclose(fileID);